import request from "@/utils/request";

/**
 * @function 登录
 * @param {object} data
 * @param {string} data.username 用户名
 * @param {string} data.password 密码
 * @param {string} data.code 图形验证码
 * @param {string} data.uuid uuid
 * **/
export const loginApi = (data) => {
  return request.post('/login', data)
}

/**
 * @function 获取用户信息
 * **/
export const userInfoApi = () => {
  return request.get('/sys/user/info')
}

/**
 * @function 获取用户下的菜单列表
 * **/
export const userMentListApi = () => {
  return request.get('/sys/menu/nav')
}

/**
 * @function 退出登录
 * **/
export const outLoginApi = () => {
  return request.post('/logout')
}

/**
 * @function 获取权限标识
 * **/
export const authoritySignApi = () => {
  return request.get('/sys/menu/permissions')
}

/**
 * @function 修改密码
 * **/
export const updataPasswordApi = (data) => {
  return request.put('/sys/user/password', data)
}